package com.xiangyueEducation.uploaderCloud.controller;

import com.xiangyueEducation.uploaderCloud.mq.batchImport.BatchImportListener;
import com.xiangyueEducation.uploaderCloud.mq.batchImport.BatchImportProducer;
import com.xiangyueEducation.uploaderCloud.service.BatchImportService;
import com.xiangyueEducation.uploaderCloud.utils.Result;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@RestController
@CrossOrigin
@Slf4j
@RequestMapping("import")
public class BatchImportController {


    @Autowired
    BatchImportService batchImportService;
    @GetMapping("excel")
    public Result<?> importExcel(@RequestBody MultipartFile file){
        return batchImportService.importExcel(file);
    }



}
